<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>盛世机电</title>
    <link href="/common/css/common-ui-cool.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="/css/system/userManage.css" />
    <script>
        if(localStorage.getItem("token")==null){
            window.history.replaceState(null, "", '/login.html');
            location.reload()
        }
    </script>
</head>

<body>
    <div class="page-container">
        <div class="header-container">
            <img class="logo-img" src="/images/logo.png">
            <ul class="top-menu">
            </ul>
            <div class="headerTime">
                <span class="dateText"></span>
                <span class="timeText"></span>
            </div>
            <div class="userInfo">
                <i class="aidicon aidicon-account-circle"></i>
                <span class="name"></span>
                <span class="logout">退出</span>
            </div>
        </div>
        <div class="main-container">
            <ul class="side-menu"></ul>
            <div class="table-container">
                <div class="select-wrap">
                    <div class="form-group">
                        <button type="button" class="btn btn-primary" id="addData">新增</button>
                    </div>
                    <div class="form-group">
                        <span class="label-text">用户名：</span>
                        <div class="layout-date" style="width: 200px;display: inline-block;">
                            <input type="text" id="optUser" class="form-control inline-block" placeholder="请输入用户名"
                                autocomplete="off" />
                        </div>
                    </div>
                    <div class="form-group">
                        <span class="label-text">选择项目：</span>
                        <select id="project">
                            <option></option>
                        </select>
                    </div>
                    <div class="form-group">
                        <button type="button" class="btn btn-default" id="searchBtn">搜索</button>
                    </div>
                </div>
                <div class="table-wrap">
                    <table id="standard_table" class="display datatable-xLarge" cellspacing="0" width="100%"
                        style="table-layout: fixed;">
                    </table>
                </div>
            </div>
        </div>
    </div>
    <script id="dataFormTpl" type="text/html">
        <input id="userId" type="hidden" value="{{id}}">
        <div class="form-horizon">
            <form class="form-validate-dom">
                <div class="form-group clearfix">
                    <label class="form-label" for="dept">用户角色：</label>
                    <select class="form-control" name="dept" id="roleId"></select>
                </div>
                <div class="form-group clearfix">
                    <label class="form-label" for="data1">用户名：</label>
                    <div class="form-group">
                        <input type="text" class="form-control" id="userName" name="date1" placeholder="请输入" autocomplete="off" value="{{userName}}">
                    </div>
                </div>
                {{if id==null }}
                <div class="form-group clearfix">
                    <label class="form-label" for="data1">密码：</label>
                    <div class="form-group">
                        <input type="password" class="form-control" id="plaintextPassword" name="date1" placeholder="请输入" autocomplete="off" value="{{plaintextPassword}}">
                    </div>
                </div>
                <div class="form-group clearfix">
                    <label class="form-label" for="data1">确认密码：</label>
                    <div class="form-group">
                        <input type="password" class="form-control" id="plaintextPassword1" name="date1" placeholder="请输入" autocomplete="off" value="{{plaintextPassword}}">
                    </div>
                </div>
                {{/if}}
                <div class="form-group clearfix">
                    <label class="form-label" for="status">锁定状态：</label>
                    <select class="form-control" name="status" id="status"></select>
                </div>
                <div class="form-group clearfix">
                    <label class="form-label" for="data2">备注：</label>
                    <div class="form-group">
                        <textarea type="text" class="form-control" id="description" name="data2" placeholder="请输入" autocomplete="off">{{description}}</textarea>
                    </div> 
                </div>
            </form> 
        </div>
    </script>
    <script id="modifyPasswordFormTpl" type="text/html">
        <input id="userId1" type="hidden" value="{{id}}">
        <div class="form-horizon">
            <form class="form-validate-dom">
                <div class="form-group clearfix">
                    <label class="form-label" for="data1">密码：</label>
                    <div class="form-group">
                        <input type="password" class="form-control" id="plaintextPassword2" name="date1" placeholder="请输入" autocomplete="off" value="{{plaintextPassword}}">
                    </div>
                </div>
                <div class="form-group clearfix">
                    <label class="form-label" for="data1">确认密码：</label>
                    <div class="form-group">
                        <input type="password" class="form-control" id="plaintextPassword3" name="date1" placeholder="请输入" autocomplete="off" value="{{plaintextPassword}}">
                    </div>
                </div>
            </form> 
        </div>
    </script>
    <script id="relateTpl" type="text/html">
        <button type="button" class="btn btn-default" id="selectAll">全选</button>
        <ul>
            {{each $data as val i}}
            <li>
                <div class="checkbox">
                    <label class="checkbox-beauty">
                        <input value={{val.value}} type="checkbox" {{if val.flag}}checked{{/if}}>
                        <span class="text-label">{{val.name}}</span>
                    </label>
                </div>
            </li>
            {{/each}}
        </ul>
    </script>

    <script src="/common/js/lib/require/require.min.js"></script>
    <script>
        require(["/js/require.config.js"], function () {
            require(["/js/common/nav.js"],function(){
                require(["/js/system/userManage.js"], function (app) {
                    app.init();
                });
            });
        });
    </script>
</body>

</html>